﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MoneyCounter.Models.Data;
using MoneyCounter.Models;

namespace MoneyCounter.Controllers
{
    public class AccountController : Controller
    {
        //
        // GET: /Account/

		public ActionResult LogIn()
		{
			LoginModel model = new LoginModel() { Login = "userlogin" };
			return View(model);
		}

		[HttpPost]
		public ActionResult LogIn(LoginModel model)
		{
			if (model.Login == "admin")
			{
				return RedirectToAction("AdminPanelAction", "AdminPanel");
			}

			return Redirect("~/");
		}
    }
}
